import request from '@/utils/request'

// 新建 编辑
export function saveCheckcard(data) {
    return request({
        url: '/api/BaseData/checkcard/submit',
        method: 'PUT',
        data:data,
    })
}

// 查询检卡
export function getCheckcardDetail(id) {
    return request({
        url: `/api/BaseData/checkcard/Detail/${id}`,
        method: 'GET'
    })
}

// 删除抽样方案
export function deleteCheckcardsample(id) {
    return request({
        url: `/api/BaseData/checkcardsample/${id}`,
        method: 'DELETE'
    })
}


// 删除抽样方案明细
export function deletecCheckcarddetail(id) {
    return request({
        url: `/api/BaseData/checkcarddetail/${id}`,
        method: 'DELETE'
    })
}


// 获取检验项目默认值 ，根据检验项目与检验条目查询
export function getInfo(data) {
    return request({
        url: `/api/BaseData/innspectiondefault/GetInfo`,
        method: 'GET',
        data:data
    })
}

// 复制
export function copy(data) {
    return request({
        url: `/api/BaseData/checkcard/copy/${data.fromId}/${data.toId}`,
        method: 'POST'
    })
}


// 删除检卡 物料
export function removeMaterial(id) {
    return request({
        url: `/api/BaseData/checkcard/material/${id}`,
        method: 'Delete'
    })
}